<?php
require_once 'model/Model.php';
class ModelUser extends Model{
    
    function __construct() {
        parent::connection();
    }
    
    //retourne un tableau mysql_fetch_array 
    function connect($user, $passwd){
        $query = "select * from sb_user where USR_NAME='$user' AND USR_PASSWD='$passwd'";
        $result = mysql_query($query);
        if(mysql_num_rows($result) == 1){
            return true;
        }
        return false;        
    }
    
}
?>
